{extend name="template/base_default"}
{block name="header"}
<link rel="stylesheet" href="__CSS__/common.css">
<link rel="stylesheet" href="__CSS__/weui.min.css">
<link rel="stylesheet" href="__CSS__/index.css">
<link rel="stylesheet" href="__CSS__/weuix.min.css"/>
<script src="__JS__/zepto.min.js"></script>
<script src="__JS__/lrz.min.js"></script>
<style>

    .form-head{
        color: white;
        font-size: 16px;
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 5px;
        overflow: hidden;
    }
    body{
        background-image:url("__IMG__/bj.png");
        background-repeat:no-repeat;
        background-size:cover;
        text-align: center;
        background-attachment:fixed;
    }
    button{
        border: none;
        color:white;
        width:100%;
        float:left;
        height: 100%;
        font-size: 18px;
        font-family: "Microsoft YaHei UI";
    }
    .botton1{
        background-color: #FF0000;
        width:50%;
    }
    .botton2{
        background-color: #131a34;
        width:50%;
    }
    .confirm{
        height:180px;
        border-radius: 20px;
        background-color: white;
        width:90%;
        margin-left: auto;
        margin-right: auto;
        margin-top: 10px;
        overflow: hidden;
        text-align: center;
        color:#545454;
        font-family: "Microsoft YaHei UI";
    }
    .confirm p{
        margin-top: 20px;
        font-size: 20px;
    }
    .add_botton{
        float:left;
        margin-left: 50px;
        float: left;
        height:40px;
        width:80px;
        border-radius: 100px;
        margin-top: 50px;
        text-align: center;
        line-height: 40px;
    }
    .add_botton1{
        background-color: #00a0e9;
        color:white;
    }
    .add_botton2{
        background-color: white;
        color:#00a0e9;
        border:solid 1px #00a0e9;
    }
    .confirm-input{
        height:92px;
        border-radius: 20px;
        background-color: white;
        width:90%;
        margin-left: auto;
        margin-right: auto;
        margin-top: 30px;
        overflow: hidden;
        text-align: center;
        color:#545454;
        background-color: rgba(95, 110, 170, 0.9);
        display: none;
    }
    .form-input3-input{
        width:50%;

        height:30px;
        margin-top: 10px;
        line-height: 24px;
        padding: 10px;
    }
    .form-input3{
        height:42px;
    }
</style>
{/block}
{block name="body"}


    <div class="confirm">
        <p>更换店长</p>
        <a href="{:url('extension/index')}"><div class="add_botton add_botton2" id="no_confirm">否</div></a>
        <div class="add_botton add_botton1" id="confirm">是</div>
    </div>
<form action="{:url('login/register')}" method="post" style="width:95%;margin: auto;margin-top: 20px">
    <div class="confirm-input">
        <label style="margin-top: 10px;color:#8c8c8c" for="acount" class="form-input3-label">账号:</label>
        <input style="border:solid 1px #8c8c8c;margin-top: 10px" class="form-input3-input" id="acount" name="acount" type="text" value="{$mobile}" placeholder="">
    </div>
    <div style="position:fixed;bottom:0;left:0;width:100%;height:40px;">
        <button id="del" class="bottom-btn botton1" type="button">删除店长</button>
        <button id="submit" class="bottom-btn botton2" type="button">提交更改</button>
    </div>
</form>
{/block}
{block name="footer"}
<script type="text/javascript" src="__JS__/public.js"></script>
<script>
    $('#confirm').click(function(){
        $('.confirm-input').slideDown();
    });
    $('#not_confirm').click(function(){
        window.history.go(-1);
    });
    $('#submit').click(function () {
            var body  ={
                account:$('#acount').val(),
                seller_id:"{$seller_id}",
            };
            var $this = $(this);
            $this.addClass('weui-btn_disabled').attr('disabled','disabled');
            ajax_post(getBaseUrl()+'/web.php/extension/add_dxe',jQuery.param(body),{
                success:function(data){
                    $.toast(data.msg,'success');
                    $this.removeClass('weui-btn_disabled').removeAttr("disabled");
                    setTimeout(
                        function(){
                            history.back(-1);
                        }
                        ,1500);
                },
                error:function(data){
                    $.toptip(data.msg, 'error');
                    $this.removeClass('weui-btn_disabled').removeAttr("disabled");
                }
            })
    });

    $('#del').click(function () {
        var body  ={
            del:'del',
            waiter_id:"{$waiter_id}",
            seller_id:"{$seller_id}"
        };
        var $this = $(this);
        $this.addClass('weui-btn_disabled').attr('disabled','disabled');
        ajax_post(getBaseUrl()+'/web.php/extension/add_dxe',jQuery.param(body),{
            success:function(data){
                $.toast(data.msg,'success');
                $this.removeClass('weui-btn_disabled').removeAttr("disabled");
                setTimeout(
                        function(){
                            history.back(-1);
                        }
                        ,1500);
            },
            error:function(data){
                $.toptip(data.msg, 'error');
                $this.removeClass('weui-btn_disabled').removeAttr("disabled");
            }
        })
    });
</script>
{/block}